<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 判断一个整数是偶数还是奇数，并输出结果 -->
    <script>
        var num = prompt("请输入一个整数")
        if(num%1==0 && num%2==0){
            console.log(num +'是偶数');
        }else if(num%1==0 && num%2!=0){
            console.log(num+ '是奇数');   
        }else{
            console.log('请输入整数');
            
        }
    </script>
</body>
</html>